[libc++] Make _LIBCPP_TYPE_VIS export members Summary: Most classes annotated with _LIBCPP_TYPE_VIS need to have at least some of their members exported, otherwise we have a lot of link errors when linking against a libc++ built with hidden visibility. This also makes _LIBCPP_TYPE_VIS be consistent across platforms, since on Windows it already exports members. With this change made, any template methods of a class marked _LIBCPP_TYPE_VIS will also get default visibility when instantiatied, which is not desirable for clients of libc++ headers who wish to control their visibility; this is the same issue as PR30642. Annotate all problematic methods with an explicit visibility specifier to avoid this. The problematic methods were found by running bad-visibility-finder [1] against the libc++ headers after making the _LIBCPP_TYPE_VIS change. The small methods were marked for inlining; the larger ones hidden. [1] https://github.com/smeenai/bad-visibility-finder Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25208 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296732 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/__locale b/include/__locale index f4882de..a878e25 100644 --- a/include/__locale +++ b/include/__locale 
@@ -92,13 +92,16 @@    const locale& operator=(const locale&) _NOEXCEPT;   - template <class _Facet> locale combine(const locale&) const; + template <class _Facet> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS + locale combine(const locale&) const;    // locale operations:  string name() const;  bool operator==(const locale&) const;  bool operator!=(const locale& __y) const {return !(*this == __y);}  template <class _CharT, class _Traits, class _Allocator> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS  bool operator()(const basic_string<_CharT, _Traits, _Allocator>&,  const basic_string<_CharT, _Traits, _Allocator>&) const;